package com.my.design.structural.proxy.JdkProxy.testjdk;

import java.io.*;

public class FileUtil {

    public static void writeStringToFile(File file, String str){
        try {
            BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file)));
            bufferedWriter.write(str);
            bufferedWriter.flush();
            bufferedWriter.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}